package com.minshenglife.zanzan.pub.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
	 * @author lei
	 * 2011-9-2
	 */
	public class StringUtils {
	 
		/**
		 * ȥ���ַ��еĿո񡢻س������з��Ʊ��
		 * ע��\\n �س�(\u000a)
		 *  \\t ˮƽ�Ʊ��(\u0009)
		 * \\s �ո�(\u0008)
 		 * \\r ����(\u000d)
 		 * \\s*|\t|\r|\n
		 * @param str 
		 * @return
		 */
	    public static String replaceBlank(String str) {
	        String dest = "";
	        if (str!=null) {
	            Pattern p = Pattern.compile("\n");
	            Matcher m = p.matcher(str);
	            dest = m.replaceAll("");
	        }
	        return dest;
	    }
	    public static void main(String[] args) {
	        System.out.println(StringUtils.replaceBlank("just do it!"));
	    }
	}